package com.autumn.xa.a.demo;

/**
 * ClassName: Demo3
 * Description:
 * Author: Shen_Yue
 * Date: 2023/4/28 15:11
 * History:
 * <author>          <time>          <version>          <desc>
 * Shen_Yue    2023/4/28 15:11   @Version 1.0        描述
 */
public class Demo3 extends Thread{

    int ying;

    public Demo3(int ying) {
        this.ying = ying;
    }

    @Override
    public void run() {
        for (int ao = 1; ao < 10; ao++) {
            for (int yun = 1; yun < 10; yun++) {
                for (int jiang = 1; jiang < 10; jiang++) {
                    for (int wen = 1; wen < 10; wen++) {
                        for (int ming = 1; ming < 10; ming++) {
                            for (int shu = 1; shu < 10; shu++) {
                                for (int xin = 1; xin < 10; xin++) {
                                    for (int feng = 1; feng < 10; feng++) {
                                        if (
                                                (ying + ao) == 13 &&
                                                (ao + yun + jiang) == 13 &&
                                                (jiang + wen + ming) == 13 &&
                                                (ming + shu + xin) == 13 &&
                                                (xin + feng) == 13
                                        ) {
                                            int [] group = {ying , ao , yun , jiang , wen , ming , shu , xin , feng};
                                            boolean isRepeat = false;
                                            for (int i = 0; i < 9; i++) {
                                                for (int j = i + 1; j < 9; j++) {
                                                    if (group[i] == group[j]) {
                                                        isRepeat = true;
                                                        break;
                                                    }
                                                }
                                                if (isRepeat) {
                                                    break;
                                                }
                                            }
                                            if (!isRepeat) {
                                                System.out.println("=>>>>>>>>>>>>>>>>" + ying + "," + ao + ","+ yun + ","+ jiang + ","+ wen + ","+ ming + ","+ shu + ","+ xin + ","+ feng + ",");
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    public static void main(String[] args) {
        for (int i = 1; i < 10; i++) {
            new Demo3(i).start();
        }
    }
}
